import { RMIObject } from "../../Engine/RMI/RMIObject";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SPetStorage } from "./SPetStorage";
import { Exception } from "../../Framework/Util/Exception";
type int = number;
//class AMI_IPet_getMyPetStorageInfo
    
    export  class AMI_IPet_getMyPetStorageInfo extends RMIObject
    {
        constructor(arg1?: Function, arg2?: Function, arg3?: any)
        {
            super(arg1, arg2);
            this.userObject = arg3;
            this.callFunction = "getMyPetStorageInfo";
            return;
        }

        public /* override */ __response(arg1: SerializeStream): void
        {
            var __is: SerializeStream;
            var petStorage: SPetStorage;
            var status: int;
            var remainMoney: int;
            var remainMinute: int;

            var loc1;
            petStorage = null;
            status = 0;
            remainMoney = 0;
            remainMinute = 0;
            __is = arg1;
            try 
            {
                petStorage = new SPetStorage();
                petStorage.__read(__is);
                status = __is.readInt();
                remainMoney = __is.readInt();
                remainMinute = __is.readInt();
            }
            catch (__ex)
            {
                this.cdeException(new Exception("ExceptionCodeSerialize", Exception.ExceptionCodeSerialize));
                return;
            }
            this.cdeResponse(petStorage, status, remainMoney, remainMinute);
            return;
        }

        public cdeResponse(arg1: SPetStorage, arg2: int, arg3: int, arg4: int): void
        {
            if (this._response)  
            {
                this._response.call(null, this, arg1, arg2, arg3, arg4);
            }
            return;
        }
    }
